UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kvBckOkTT5Tm8UMUj01rVatit6QxhkPI/9LfF8IRbZo='
WHERE
key_id = '7b83c82207077d04f0ae7c0dc0e5517ef7a197b71860decf1eddf92e912c42b5'
AND (
token = 'kvBckOkTT5Tm8UMUj01rVatit6QxhkPI/9LfF8IRbZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)