UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bZLZa4BQJ9HIzwgpucegClDIhSzSQEJ1KMEn9FY+Ioc='
WHERE
key_id = '8a2a83ffb4a411066e2a5c3f8bf640c5c01ddb3b3eae20399f38eb74591f88c0'
AND (
token = 'bZLZa4BQJ9HIzwgpucegClDIhSzSQEJ1KMEn9FY+Ioc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)