UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sBbfcAKwLlHQjFW+27X5jshymuyYzFl/pgi/Ax6NGso='
WHERE
key_id = 'd704a62a101a6b5bdb0772a74c7bb4ed2b0e3899876bf255ffe2102dcf0bff6e'
AND (
token = 'sBbfcAKwLlHQjFW+27X5jshymuyYzFl/pgi/Ax6NGso='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)