UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '26CMr3JkfKB3JYsureSlwFCsMuvi0OCH8apXfU2EMwg=' 
WHERE 
  key_id = 'a85d817bd2a1488d98f53d1c516c78ec57e77bab9cf4cf0ad579d5418a071e98' 
  AND (
    token = '26CMr3JkfKB3JYsureSlwFCsMuvi0OCH8apXfU2EMwg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034