UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fI3/zfWfnzXvzCdgKjwEmIOmkl5OAsfpX7YW+ERbgT4='
WHERE
key_id = '608264a6230fc8cbe7891178fcfce04d5853d37fcacb374ec2d898d78d862dc9'
AND (
token = 'fI3/zfWfnzXvzCdgKjwEmIOmkl5OAsfpX7YW+ERbgT4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)