UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YzQ5HHT+PdCxKnoGDZQNJd9aHqIm/yNxe5JwTQSgvhw='
WHERE
key_id = '09dfdf7edc988ce452fc32dc7f0e11a026472e6a635120d3917d13331d314df9'
AND (
token = 'YzQ5HHT+PdCxKnoGDZQNJd9aHqIm/yNxe5JwTQSgvhw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)