UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iUc4DI2IDhenrHFEy/+YmyIYPitXL9TAWjH+glc8/nQ='
WHERE
key_id = '09d0bda773859b01122c121bad0405ecc1ce679a745977d1943a50d49218aa5a'
AND (
token = 'iUc4DI2IDhenrHFEy/+YmyIYPitXL9TAWjH+glc8/nQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)