UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/yqajKjuCRuu9f6kccfqwfpSN4sVOXGsL3Cr0Pxuqho=' 
WHERE 
  key_id = '76abf3e8e6edaedcd1cbc591b01b87e750d14380755a42b191919ad17d5b7d74' 
  AND (
    token = '/yqajKjuCRuu9f6kccfqwfpSN4sVOXGsL3Cr0Pxuqho=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026