UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7mFgz8JBvaxtHsl1XBZnEN11gEvILV0YmzbvAJTPr/c='
WHERE
key_id = '1fcaba258d19fcd4e07e38f810c91ce97288cc1a56d965079dbd5b8d75e5f9e2'
AND (
token = '7mFgz8JBvaxtHsl1XBZnEN11gEvILV0YmzbvAJTPr/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)