UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1k9lAu/e/oTkjcdcYzSDwzLQbvGA/wH49G2zoEnF3xE='
WHERE
key_id = '440a159e5da4ec397f203046092ae544f9603a736de17f397de28dc69a684532'
AND (
token = '1k9lAu/e/oTkjcdcYzSDwzLQbvGA/wH49G2zoEnF3xE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)