UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fJKDbovTGDdMdrNAY6gEIaAkoCtAjGlCIndFygrh4Fk=' 
WHERE 
  key_id = '2cd555c0fc0019187d882088c1d694a4974399e6fb170bdca912031eb17c423f' 
  AND (
    token = 'fJKDbovTGDdMdrNAY6gEIaAkoCtAjGlCIndFygrh4Fk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050