UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'G/sBokJEIcYsqwvFJzdxx/1lSr9aN64AXsTOiQqUQDU=' 
WHERE 
  key_id = 'b94c5124aff66f84572425412722cd66e80d60f1d0f24a35dcc2f680e7e533c0' 
  AND (
    token = 'G/sBokJEIcYsqwvFJzdxx/1lSr9aN64AXsTOiQqUQDU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027