UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '60kkkxkCwScvb1zp0ZcQfQ4Tgic3otYT87H8blockeg='
WHERE
key_id = '834bd3e6251d4992ccaf62cf9797af5c1c02f002b1b3de1456ef9c91ebf1139a'
AND (
token = '60kkkxkCwScvb1zp0ZcQfQ4Tgic3otYT87H8blockeg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)