UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fGxpV4DpOividJWDJB5rbu+MAIt5WrsxiTSusz8A688='
WHERE
key_id = '061106203b8d52d750e8083d16897924cc0955cbb06cf72c3ae7eea657a0f330'
AND (
token = 'fGxpV4DpOividJWDJB5rbu+MAIt5WrsxiTSusz8A688='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)