UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PPrxPXfJm3TUaQzb0nt3hV4CAPF9Vn48XFDxN+ZllQo=' 
WHERE 
  key_id = '35827c4804a8643a9baa2d281d6b9d70191f86eb59062af78a1f6f03a75961d6' 
  AND (
    token = 'PPrxPXfJm3TUaQzb0nt3hV4CAPF9Vn48XFDxN+ZllQo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026