UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4PeFmn7xgbrPljFCyP77QETE/4+H2Z2MNLzm+DjTGQI='
WHERE
key_id = '74a3c9b6f860a0da7c9e4d00a985665a496a93ecf3e108eafc81f7271d0d9314'
AND (
token = '4PeFmn7xgbrPljFCyP77QETE/4+H2Z2MNLzm+DjTGQI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)