UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kh85dvEHLeUmMAFTmRA5DGWgYWJx1WJ8e6/qwFrFdJc='
WHERE
key_id = '6cd7401cdcc4f50b8dffbeccea8de33098b63f12ac66d1b43280b3fafb039e66'
AND (
token = 'kh85dvEHLeUmMAFTmRA5DGWgYWJx1WJ8e6/qwFrFdJc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)