UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WnMirogKKXsRzWaTlEOt3G3kcVoO3HmTg0yQR/XKicc=' 
WHERE 
  key_id = 'eccdb0abe7454294dda10784559033accca09328a9ddf3c939b413f1156d6bde' 
  AND (
    token = 'WnMirogKKXsRzWaTlEOt3G3kcVoO3HmTg0yQR/XKicc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025