UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '08BxGm+GggOXyxfwItgcFGcYIk9yS1SURFLKfNjbSgQ='
WHERE
key_id = 'feb0a48eb58a6d3f45cc6c3987ee2a24bc426fe82dd99d3116eb79059190c0cb'
AND (
token = '08BxGm+GggOXyxfwItgcFGcYIk9yS1SURFLKfNjbSgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)