UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+k0VuebNfrllNfOf3WYGIRa0UkL38FM8+s9btpwCIM8='
WHERE
key_id = 'a19097ef6721cf16f5a6fac8317bc986d8e532ac41fceaa51345e0f7d22bc2be'
AND (
token = '+k0VuebNfrllNfOf3WYGIRa0UkL38FM8+s9btpwCIM8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)