UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UvWQkFhmhulmZ9GiTihQEIXxMDce/UjW6pHptSNWu2c=' 
WHERE 
  key_id = 'f432f90ccac43317a594fc23270cd6327e14e6f5a91b307c7e8596c18cd68a9b' 
  AND (
    token = 'UvWQkFhmhulmZ9GiTihQEIXxMDce/UjW6pHptSNWu2c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033