UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5WU73xtXuA0uHJ6DNCiyeUNGT5dT9Pw8RqtwkuopCio='
WHERE
key_id = '3a8c83cf7d349cce38b5f8b370af103faca2bda090e35b0e0bf7e1cd9f076eb7'
AND (
token = '5WU73xtXuA0uHJ6DNCiyeUNGT5dT9Pw8RqtwkuopCio='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)