UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Psbt94UHqH1Y5tlVGar9S6QqZSzdZ8w29vnqKP9DZvI=' 
WHERE 
  key_id = '6feebbb9077b8ec2f6bb3858ea2ae01d2a9a6b66f57caef106cb5204f3d16c9c' 
  AND (
    token = 'Psbt94UHqH1Y5tlVGar9S6QqZSzdZ8w29vnqKP9DZvI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030