UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oEo9Qri7QcdzGD38hLCb5JmNbcZQXiCqo1h2D52M6SE='
WHERE
key_id = '932215775e5c6143a7cd66834d4fed8f0e6474cfb45291c2c5a59f2d0e7b25aa'
AND (
token = 'oEo9Qri7QcdzGD38hLCb5JmNbcZQXiCqo1h2D52M6SE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)