UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5Se3hJrxVWxV0K8xXAGD3pZUN4uJy1rDJ7fBVOm3/tI=' 
WHERE 
  key_id = 'e753f74ff0d4e577fb1d28c583ae3b975083b899b346b4ad16967fd30b1d6a07' 
  AND (
    token = '5Se3hJrxVWxV0K8xXAGD3pZUN4uJy1rDJ7fBVOm3/tI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050