UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zvbrbgb7FrltYDI0/oYquv215NBPZVqq0H2soEHsWNw='
WHERE
key_id = '841074b69e4e73e3b0f2d516fee5b23e4778502d00cf0ec93011e8e4a5e892a4'
AND (
token = 'zvbrbgb7FrltYDI0/oYquv215NBPZVqq0H2soEHsWNw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)