UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rXGj53SX3qhxV72+v7YD/6dfKP2ppKzznne1dRyHYLM='
WHERE
key_id = '2f34f7278ae5aca643132a50bca482da92e6b5ac8d526859662c0aedd552c7d5'
AND (
token = 'rXGj53SX3qhxV72+v7YD/6dfKP2ppKzznne1dRyHYLM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)