UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UIThElo8vcYH2WOYNM3j7MZS3lb9UR4by9rMEnxvYNI='
WHERE
key_id = '475bdfe13cce43eeb885159d7754c79d228127d392a0db6c980ffbc4427a93aa'
AND (
token = 'UIThElo8vcYH2WOYNM3j7MZS3lb9UR4by9rMEnxvYNI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)