UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZJTLirgZ9cmk8TYU+er+k2Voc1JBMCtUqK7hu1S6e+s='
WHERE
key_id = '4d421b98c79ccd6be1f71f2b94af8f14e6440bd0fac0f4ac73f2fa8797aa8e93'
AND (
token = 'ZJTLirgZ9cmk8TYU+er+k2Voc1JBMCtUqK7hu1S6e+s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)