UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C3UG72Ub1a5RNNojhikeMwHghthwthRQCmsF9+0aiYQ='
WHERE
key_id = '36261832c963e7e28725915c3e7bc2519679775cd2a4cc5dbb6eff2a5b5546f5'
AND (
token = 'C3UG72Ub1a5RNNojhikeMwHghthwthRQCmsF9+0aiYQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)