UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'adnMlQTuJ7dsNGtKp0tMjAaa1RcJWfwuQlKKSkBTZ0o=' 
WHERE 
  key_id = 'c04d693ba0e7b8dacef9dd3d57a8a824cc1b717f2f6ecc67661fcb3c93429116' 
  AND (
    token = 'adnMlQTuJ7dsNGtKp0tMjAaa1RcJWfwuQlKKSkBTZ0o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030