UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '69MKSXQZ5veGCqS7wnwFSO3sDFQqpg55dy6ROSytO8U='
WHERE
key_id = '4648f6542028b333fbf10e3db6c9bb3fef4a4591bd6ff6178a3d7dcb8d2bfdfa'
AND (
token = '69MKSXQZ5veGCqS7wnwFSO3sDFQqpg55dy6ROSytO8U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)