UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yjRnNedL6JYy3bgj7gtWSCfGnPFsaIPZKb/LZMK3K5U=' 
WHERE 
  key_id = '3d95f0b348513cbd2418cb486c13b9d8cc42c7843c4efb2ec92b6af62bf3ddcc' 
  AND (
    token = 'yjRnNedL6JYy3bgj7gtWSCfGnPFsaIPZKb/LZMK3K5U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029