UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'n/+YsR5+tWJ7RcC/Qkyy/a19iCU7c27vscFO/h7yQfs=' 
WHERE 
  key_id = '3ce2735cf325b9ae3bc370f3d8f00fa1c214bf27c643cc2946d9066326c3d6f3' 
  AND (
    token = 'n/+YsR5+tWJ7RcC/Qkyy/a19iCU7c27vscFO/h7yQfs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019