UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '07ht6Qsua8p/V7GHQGaH/FaNQp290uIudY4Xwr0iaDM='
WHERE
key_id = '3f1913d3ba906204acc062fd7073b181778cf280dd0418dd77346ada9ecf93a0'
AND (
token = '07ht6Qsua8p/V7GHQGaH/FaNQp290uIudY4Xwr0iaDM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)