UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1yHvmsBwrMF/YZbRX58jee1P3kdz4VOCwaPGqKBP0uE='
WHERE
key_id = '0656f20617a718e677babba97b97b6dc10d6d71fd589589e91ebcde12413b779'
AND (
token = '1yHvmsBwrMF/YZbRX58jee1P3kdz4VOCwaPGqKBP0uE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)