UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7Lb07uaHswsPRfp+CPmaxtvqFgAJGbu+KioyfYeqkZk='
WHERE
key_id = '8feaaeb0ff1c46a662edde36a3b9427aa9993d3a378fbf8fd58cf674a27c9c6c'
AND (
token = '7Lb07uaHswsPRfp+CPmaxtvqFgAJGbu+KioyfYeqkZk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)