UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JFYssP8IZiinuwyVXiOKhyw+qwkNSHXz1Vlg/j+2a8A=' 
WHERE 
  key_id = '2bc828245501100ee0a2acf5713adb811e2f14b26c0dee2251214e3df60134d1' 
  AND (
    token = 'JFYssP8IZiinuwyVXiOKhyw+qwkNSHXz1Vlg/j+2a8A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030