UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4FriXnTrknEKqO8Y/76gRpXUfNGln7yOQqjKZn3uDlM='
WHERE
key_id = '0466df20cc5fea61574d3b7d027bff5b6cb500976be4067ecf886885cd05ec9c'
AND (
token = '4FriXnTrknEKqO8Y/76gRpXUfNGln7yOQqjKZn3uDlM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)