UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oXisR0ts2kcEavxHwdWBtfM6h+hunklxEZoxOBoUieM='
WHERE
key_id = '4df42a27aaa77863d8cbbbb449aa2abc4460a99b3947bc2beb8c99b38415e7b4'
AND (
token = 'oXisR0ts2kcEavxHwdWBtfM6h+hunklxEZoxOBoUieM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)