UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9IkjX25CCore7Vgab/H9Q3ju2sn4cVWM/qCndi2adAs='
WHERE
key_id = '0d8f4d58b971fd4fd4e570db27448b9306a6ce37205f016c14f47c82f9240ce0'
AND (
token = '9IkjX25CCore7Vgab/H9Q3ju2sn4cVWM/qCndi2adAs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)